﻿using System.Web.Mvc;

namespace MeetingAssistant.Extension.Filters
{
    public class MyAuthorizeAttribute : AuthorizeAttribute
    {
        public override void OnAuthorization(AuthorizationContext filterContext)
        {
            if(filterContext.HttpContext.User.Identity.Name != "admin")
            {
                filterContext.HttpContext.Response.Write("您没有此权限");
                filterContext.HttpContext.Response.End();
                return;
            }
            base.OnAuthorization(filterContext);
        }
    }
}